package com.fullhome8.cn.wanghongweb.service.impl;

import com.fullhome8.cn.wanghongweb.biz.NewsBiz;
import com.fullhome8.cn.wanghongweb.model.News;
import com.fullhome8.cn.wanghongweb.service.NewService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NewServiceImpl implements NewService {

    @Autowired
    private NewsBiz newsBiz;

    @Override
    public List<News> queryNewsList() {

        PageInfo<News> newsPageInfo = newsBiz.findPage(1, 10, null);
        return newsPageInfo.getList();
    }
}
